// this package should be correct.
package uk.ac.glasgow.demosocs.tests;


//these are all the imports that you will definately need
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;


//these are some sample imports that will need to be changed based on the test case.
import uk.ac.glasgow.demosocs.*;
import uk.ac.glasgow.demosocs.impl.*;
import uk.ac.glasgow.demosocs.users.*;

import java.util.Date;
import java.util.Set;

public class PublishResults{

// Set up the instance variables here;
	VotingSystem vs;

	// initialise the instance variables
	@Before
	public void setUp() throws Exception{
		vs = new VotingSystemStub();
		vs.createElection("ClassRep", "P");
		Date nominations = new Date("19/2/12");
		Date start = new Date("20/2/12");
		Date end = new Date("10/3/12");
		vs.editElection(nominations,start, end, "001");
		vs.nominateCandidate("001");
		vs.setCurrentElection("l3ClassReps");
		vs.setCurrentUser("001", "pass");
		vs.acceptNomination();
		vs.setCurrentUser("002","pass");
		Vote v = new OneOfNVoteStub("001");
		vs.castVote(v);
	}

	//set the instance variables to null in the method
	@After
	public void tearDown() throws Exception{
		vs = null;
	}


	// perform the acceptance test in this method using the AssertEquals method
	@Test 
	public void PublishResultsTest(){
		OurPluralityElection e =  (OurPluralityElection) vs.getCurrentElection();
		e.setElectionManager("001");
		vs.publishResults();
	}
}